package org.one.stone.soup.grfxML;

import org.one.stone.soup.exception.ExceptionTemplate;
import org.one.stone.soup.stringhelper.StringGenerator;
  /*
 * Copyright 2000-2001 Wet-Wired.com Ltd.,
 * Portsmouth England
 * All rights reserved.
 */

public class GrfxMLException extends ExceptionTemplate {

	public static final int UNKNOWN_CODE = 0;
	public static final int WARNING_UNRECOGNISED_TAG_CODE = 1;
	public static final int WARNING_UNRECOGNISED_ATTRIB_CODE = 2;
	public static final int WARNING_BAD_PLUGIN_CODE = 3;
	public static final int WARNING_BAD_PROTOTYPE_CODE = 4;

	static{
		message = new String[5];

		message[UNKNOWN_CODE]="Unknown exception code #.";
		message[WARNING_UNRECOGNISED_TAG_CODE]="WARNING: An element with name # is not recognized in a <#> tag. At line #";
		message[WARNING_UNRECOGNISED_ATTRIB_CODE]="WARNING: An attribute of name # is not recognized in a <#> tag. At line #";
		message[WARNING_BAD_PLUGIN_CODE]="WARNING: A plugin class with the name # was not found. At line #";
		message[WARNING_BAD_PROTOTYPE_CODE]="WARNING: A prototype with the name # was not found to build node id=\"#\"";
	}
public GrfxMLException(int code, java.lang.Object[] data) {
	super(code, data);
}
public static void warning(int tmp,Object[] args) {
	System.out.println( StringGenerator.generateStringWithMask(message[tmp],args) );
}
}
